<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>

<link href="${pageContext.request.contextPath}/css/sys.css" type="text/css" rel="stylesheet" />
</head>

<body >
 <table border="0" cellspacing="0" cellpadding="0" width="100%">
	 <tr>
		 <td class="topg"></td>
	 </tr>
 </table>

<table border="0" cellspacing="0" cellpadding="0"  class="wukuang" width="100%">
  <tr>
    <td width="1%"><img src="${pageContext.request.contextPath}/images/tleft.gif"/></td>
    <td width="39%" align="left">[员工管理]</td>
   
    <td width="57%" align="right">
    	<%--高级查询 --%>
		<a href="javascript:void(0)" onclick="condition()"><img src="${pageContext.request.contextPath}/images/button/gaojichaxun.gif" /></a>
    	<%--员工注入 --%>
	  	<a href="${pageContext.request.contextPath}/pages/staff/addStaff.jsp">
	  		<img src="${pageContext.request.contextPath}/images/button/tianjia.gif" />
	  	</a>
      
    </td>
    <td width="3%" align="right"><img src="${pageContext.request.contextPath}/images/tright.gif"/></td>
  </tr>
</table>

<!-- 查询条件：马上查询 -->
<form id="conditionFormId" action="${pageContext.request.contextPath}/staff/staffAction_findAll" method="post">
	<table width="88%" border="0" style="margin: 20px;" >
	  <tr>


		<%--部门下拉选--%>
	    <td width="80px">部门：</td>
	    <td width="200px">
	    	<select name="crmPost.crmDepartment.depId" onchange="changePost(this)">
			    <option value="">--请选择部门--</option>
			    <option value="ee050687bd1a4455a153d7bbb7000001">教学部</option>
			    <option value="ee050687bd1a4455a153d7bbb7000002">咨询部</option>
			</select>

	    </td>



		<%--职务下拉选--%>
	    <td width="80px" >职务：</td>
	    <td width="200px" >
	    	
	    	<select name="crmPost.postId" id="postSelectId">
			    <option value="">--请选择职务--</option>
			    <option value="ee050687bd1a4455a153d7bbb7000003">总监</option>
			    <option value="ee050687bd1a4455a153d7bbb7000004">讲师</option>
			    <option value="ee050687bd1a4455a153d7bbb7000005">主管</option>
			</select>

	    </td>


	    <td width="80px">姓名：</td>
	    <td width="200px" ><input type="text" name="staffName" size="12" /></td>
	    <td ></td>
	  </tr>
	</table>
</form>


<table border="0" cellspacing="0" cellpadding="0" style="margin-top:5px;">
  <tr>
    <td ><img src="${pageContext.request.contextPath}/images/result.gif"/></td>
  </tr>
</table>
<%--头行--%>
<table width="100%" border="1" >
  <tr class="henglan" style="font-weight:bold;">
    <td width="10%" align="center">员工姓名</td>
    <td width="6%" align="center">性别</td>
    <td width="12%" align="center">入职时间</td>
    <td width="15%" align="center">所属部门</td>
    <td width="10%" align="center">职务</td>
    <td width="10%" align="center">编辑</td>
  </tr>

	<%--点击员工管理，显示所有的员工信息--%>
	<%--遍历返回的结果集 奇偶行变色--%>
	<s:iterator value="#allStaff" status="status">
		<tr class="<s:if test="#status.even">tabtd1</s:if><s:else>tabtd2</s:else>">
			<td align="center"><s:property value="loginName"/></td>
			<td align="center"><s:property value="gender"/></td>
			<td align="center"><s:date name="onDutyDate" format="yyyy-MM-dd"/></td>
			<td align="center"><s:property value="post.department.depName"/></td>
			<td align="center"><s:property value="post.postName"/></td>
			<%--最后一列，图片链接，拼接id，根据id进行查询--%>
			<td width="7%" align="center">
				<a href="${pageContext.request.contextPath}/findById.action?staffId=<s:property value="staffId"/>"><img src="${pageContext.request.contextPath}/images/button/modify.gif" class="img" /></a>
			</td>

		</tr>
	</s:iterator>
</table>

</body>
</html>
